package com.example.demo.util;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import lombok.extern.slf4j.Slf4j;

/**
 * @author CJunGod 1038804380@qq.com
 *
 */
@Slf4j
//@ControllerAdvice 异常切面类
@ControllerAdvice
public class GlobalExceptionHandler {
	
	@ExceptionHandler({RuntimeException.class})
	public String exceptionHandler() {
		log.error("错误");
		return "/500";
	}

}
